Introduction
This document provides a reproducible record of the analyses we performed to check the robustness of our results. Specifically, it focuses on the robustness of the main findings when restricting the analysis to the final 20 days of the experiment, thereby excluding the initial transient dynamics.
The main article investigates how the distribution of species’ fundamental responses to environmental change—quantified using our novel metric of fundamental imbalance—influences the temporal stability of community biomass. Here, we reproduce the core analyses using only data from the last 20 days, to assess whether the relationships observed in the full dataset remain consistent when focusing on periods that better reflect equilibrium-like conditions.
We show that the key results—particularly the effects of imbalance, nutrients, temperature, and species richness on temporal stability—are robust even when early, potentially transient dynamics are removed. This strengthens the generality of the conclusions presented in the main text.
All results in this document are generated using an R Markdown file and are fully reproducible from the processed experimental dataset.
Load datasets, Data wrangling and Imbalance calculation
Biomass
The first 2/3 weeks of the experiment show a strong increase in community biomass, which is followed by a decrease in the ~30 days of the experiment. It looks like there were some transient dynamics in the beginning of the experiment, which is followed by a stable phase. Since we are interested in the stability of the stable phase, we exclude the transient dynamics from the analysis. We do this by removing the first 40 days of the experiment.
Plot biomass last 20 days

Figure 1 : Community total biomass during the experiment in different environmental treatments. Different color represent richness levels. The first 40 days of the experiment are excluded from the analysis, since they show transient dynamics.
Main Results
We now look at the main results of the experiment. We are going to look first at the effect of richness, temperature and nutrients on community temporal stability. Then, we are going to look at the relationship between divergence (original response diversity metric) and temporal stability. Finally, we are going to look at the relationship between imbalance and temporal stability.
In the whole analysis, we calculated the temporal stability of total community biomass as the inverse of the coefficient of variation (ICV) (i.e. \(\frac{\sigma}{\mu}\)).
Effect of T, N and R

Figure 2: Effects of richness (a), temperature (b), and nutrients (c) on community total biomass temporal stability.
We can see that richness and temperature do not have a clear effect on community temporal stability, while stability was higher at higher nutrient concentration.
Effect RD
We are now going to look at how imbalance affected temporal stability of total community biomass. We are going to look at the relationship between fundamental imbalance (so based only on species response surfaces measured in monoculture), an realised imbalance (measured accounting for species contribution to balance).
This is fundamentally testing our most important hypothesis.

Figure 7: Effects of fundamental and realised imbalance on total community biomass temporal stability.
We can see that imbalance is always negatively related to temporal stability, which means that balance in species responses promotes stability across richness levels. Interestingly, we see that there is little difference between fundamental and realised imbalance.
But is the difference between fundamental and realised imbalance significant? We can test this using a linear model with both fundamental and realised imbalance as predictors of stability, and one with only fundamental imbalance as predictor of stability, and compare whether the models are significantly different.
Imbalance: realised vs fundamental
# compare if the slope of fundamental and realised balance is significantly different for each richness level
# Fit the linear model with interaction
complete_aggr_2<- complete_aggr %>%
# Remove the units from the 'nutrients' and 'temperature' columns
mutate(
nutrients = as.numeric(gsub(" g/L", "", nutrients)), # Convert nutrients to numeric
temperature = gsub(" °C", "", temperature) # Remove the unit but keep as character
) %>%
# Convert temperature ranges to numeric codes using case_when
mutate(
temperature = case_when(
temperature == "18-21" ~ 1,
temperature == "22-25" ~ 2,
temperature == "25-28" ~ 3,
TRUE ~ NA_real_ # Handle unexpected values with NA
)
)
# Fit the linear model with interaction
lm_full_int1<-lm(data=complete_aggr_2,log10(stability)~log10(balance_f)+scale(nutrients)*scale(temperature)+richness)
lm_full_int2<-lm(data=complete_aggr_2,log10(stability)~log10(balance_f)+ log10(balance_r)+scale(nutrients)*scale(temperature)+richness)
Table 7: Anova table of the model with only realised balance vs one with both realised and fundamental balance as predictors of stability.
anova5 <- anova(lm_full_int1, lm_full_int2, test = "Chisq")
anova_tidy5 <- broom::tidy(anova5)
# Display the tidy ANOVA table using gt with formatted p-values and adjusted size
anova_tidy5 %>%
gt() %>%
cols_label(
term = "Term",
df.residual = "DF",
rss = "RSS",
sumsq = "sumsq",
p.value = "p-value"
) %>%
fmt_number(
columns = vars(p.value),
decimals = 3
) %>%
tab_style(
style = cell_text(weight = "bold"),
locations = cells_body(
columns = vars(p.value),
rows = p.value < 0.05
)
) %>%
tab_options(
table.width = px(600), # Adjust table width (e.g., 400px)
table.font.size = px(12), # Adjust font size (e.g., 12px)
data_row.padding = px(10) # Adjust row padding (e.g., 4px for more compact rows)
)
| Term |
DF |
RSS |
df |
sumsq |
p-value |
| log10(stability) ~ log10(balance_f) + scale(nutrients) * scale(temperature) + richness |
148 |
4.276219 |
NA |
NA |
NA |
| log10(stability) ~ log10(balance_f) + log10(balance_r) + scale(nutrients) * scale(temperature) + richness |
147 |
4.267968 |
1 |
0.008251022 |
0.594 |
A model with both fundamental and realised imbalance as predictors improved very little the variance explained by the model. The two models are not significantly different, suggesting that fundamental imbalance captures well the effect of imbalance on stability, and adding the species contribution to total biomass (realised imbalnce) does not improved the model.
We now compare also the AIC of the two models
AIC(lm_full_int1, lm_full_int2)
## df AIC
## lm_full_int1 8 -100.63421
## lm_full_int2 9 -98.93357
The AIC of the model with only fundamental imbalance is lower than the AIC of the model with both fundamental and realised imbalance, suggesting that the model with only fundamental imbalance is a better model. However, the difference is very small.
Linear models
Dependence of Imbalance on Temperature
Since imbalance depends on the slopes of species’ responses, and the slopes of species responses between two environmental conditions depend on the shape of species responses and the position of the optimum of the species response curve, we may expect that imbalance depends on temperature. For example, when the environment (i.e. temperature) fluctuates at higher mean temperatures, the species responses may be more similar (i.e. all species have the same sign of response), leading to less symmetrical response distributions, and thus higher imbalance.
We look now at how imbalance changes with temperature, in all possible combinations of species responses for each richness level and each environmental condition. We calculate the sum of slopes of all possible combinations of species responses, and then calculate the imbalance for each combination. We then plot the relationship between imbalance and temperature for each combination of species responses.

Figure 8: Relationship between imbalance and temperature for all possible combinations of species responses. The points represent the imbalance of each combination of species responses The points are colored by temperature regime, and the facets represent whether the combination of species responses was selected for the experiment.
We can see that imbalance increases with temperature, and that the relationship is the same in selected vs non selected community compositions. This suggests that imbalance is intrinsically dependent on temperatures, and that the species responses are more similar when the environment fluctuates at higher temperatures.
Inevitably, this will affect the stability of the community, as we have seen in the previous analysis. Yet, it also means that the effect of imbalance on stability is not independent of temperature, or more generally, of the environmental conditions. Indeed, temperature and nutrients have been used to estimate species’ responses, and thus imbalance inherently depends on the environment.
Let’s look at the variance explained by imbalance and the environment on stability.

Figure 8: Variance explained by imbalance and the environment on stability. The total variance explained by imbalance and the environment is shown in grey, and the unique variance explained by imbalance and the environment is shown in light grey.
95% of the variance explained by balance is shared with nutrients and temperature, which is not suprising considering how imbalance is calculated. However, there is additional variance explained by the environment that is not shared with balance. This suggests that the environment has an independent effect on stability, which is not mediated by imbalance.
This may be related to the fact that imbalance was calculated using monoculture data collected at constant temperature, whereas in the community experiment, temperature was fluctuating, and species were interacting.
Model only looking at imbalance and richness, environmental conditions as random effects
We first investigate the effect of imbalance on stability while accounting for different environmental contexts. We fit a linear mixed-effects model including temperature, nutrient level, and composition as random factors to account for the different environmental contexts in which the imbalance was measured. This allows us to assess the effect of imbalance on stability while controlling for the influence of temperature and nutrient levels.
model_rev3 <-lmer(log10(stability) ~ log10(balance_f) + richness +
(1 + temperature + nutrients || composition),
data = complete_aggr_2,
REML = FALSE
)
# check model's assumptions
check_model(model_rev3)
Figure 9: Model check for the linear mixed-effects model with balance, richness as fixed effect. The model fits reasonably well the data.
Table 10: Linear mixed-effects model results for the effects of balance, richness on community stability. Estimates are presented with 95% confidence intervals and p-values.
| Linear Regression Results |
| Predictor |
Estimate |
95% CI |
t-value |
p-value |
| Intercept |
-0.19 |
-0.30, -0.08 |
-3.59 |
<0.001 |
| log10(imbalance) |
-0.08 |
-0.13, -0.04 |
-3.77 |
<0.001 |
| richness |
|
|
|
|
| 2 |
— |
— |
|
|
| 3 |
-0.16 |
-0.29, -0.03 |
-2.48 |
0.019 |
| 4 |
-0.01 |
-0.14, 0.12 |
-0.17 |
0.9 |
| Abbreviation: CI = Confidence Interval |
Table 11: ANOVA table of the linear mixed-effects model with balance and richness as predictors of stability.
| Term |
F Statistic |
DF |
p-value |
| (Intercept) |
12.874427 |
1 |
0.000 |
| log10(imbalance) |
14.232860 |
1 |
0.000 |
| richness |
7.460851 |
2 |
0.024 |
Using the model suggested by reviewer 3, we find that imbalance is a significant predictor of stability, and that the model explains a significant amount of variance in stability. Richness effect on stability remains very small.
Model presented in the main text - BUT with only the last 20 days of the experiment
To disentangle the shared variance between imbalance, temperature, and nutrients, we first removed the variance in temperature and nutrients that could be explained by imbalance. This can be done by regressing temperature and nutrients on imbalance and extracting the residuals, a method previously used to isolate independent effects among collinear predictors (e.g., Dormann et al. 2013; Graham 2003). The residual temperature and nutrient values thus represented variation independent of imbalance, allowing us to test their effects on stability without confounding influences of shared variance with imbalance. This approach enabled us to evaluate the relative importance of species richness and imbalance while accounting for environmental variability. By including residual temperature and nutrient values in the model, we ensured that our analysis focused on their independent contributions to stability.
Control effect of environment on balance
Now, we can build a linear model with imbalance, richness, the residuals of temperature and nutrients and their interaction as predictors of stability. We also use composition as random effect to account for some compositions being used in more than one treatment combination.
We also want to test whether the inclusion of random slopes for log10(balance_f) improves the model’s ability to explain variability in log10(stability) among compositions. We will compare the model with random slopes for log10(balance_f) to the model without random slopes for log10(balance_f) using a Likelihood Ratio Test.
## Data: complete_aggr_2
## Models:
## model_no_random: log10(stability) ~ log10(balance_f) + richness + resid_temp * resid_nut + (1 | composition)
## model_with_random: log10(stability) ~ log10(balance_f) + resid_temp * resid_nut + richness + (1 + log10(balance_f) | composition)
## npar AIC BIC logLik -2*log(L) Chisq Df Pr(>Chisq)
## model_no_random 9 -126.29 -98.896 72.143 -144.29
## model_with_random 11 -124.44 -90.963 73.220 -146.44 2.1542 2 0.3406
A model with random slopes for log10(balance_f) is not better than one without. Thus, we will use the model without random slopes for log10(balance_f) for the rest of the analysis.
# check model's assumptions
check_model(model_no_random)
Figure 11: Model check for the linear mixed-effects model with balance, richness, and the residuals of temperature and nutrients as predictors of stability. The model fits well the data.
Table 13: Linear mixed-effects model results for the effects of balance, richness, and the residuals of temperature and nutrients on community stability. Estimates are presented with 95% confidence intervals and p-values.
| Linear Regression Results |
| Predictor |
Estimate |
95% CI |
t-value |
p-value |
| Intercept |
-0.14 |
-0.24, -0.05 |
-3.08 |
0.004 |
| log10(imbalance) |
-0.10 |
-0.13, -0.06 |
-5.47 |
<0.001 |
| richness |
|
|
|
|
| 2 |
— |
— |
|
|
| 3 |
-0.12 |
-0.25, 0.01 |
-1.98 |
0.061 |
| 4 |
-0.07 |
-0.21, 0.07 |
-1.03 |
0.3 |
| Residuals of temperature |
-0.03 |
-0.08, 0.01 |
-1.55 |
0.12 |
| Residuals of nutrients |
0.32 |
0.23, 0.41 |
6.96 |
<0.001 |
| interaction temperature * nutrients |
-0.06 |
-0.20, 0.08 |
-0.79 |
0.4 |
| Abbreviation: CI = Confidence Interval |
Results do not fundamentally change, but there is not an interaction between temperature and nutrients anymore. If anything, the effect of imbalance is even large in the last 20 days of the experiment, and the effect of richness is even smaller.
Table 14: ANOVA table of the linear mixed-effects model with balance, richness, and the residuals of temperature and nutrients as predictors of stability.
| Term |
F Statistic |
DF |
p-value |
| (Intercept) |
9.4582172 |
1 |
0.002 |
| log10(imbalance) |
29.8929939 |
1 |
0.000 |
| richness |
4.0008412 |
2 |
0.135 |
| resid_temp |
2.4042898 |
1 |
0.121 |
| resid_nut |
48.3949028 |
1 |
0.000 |
| resid_temp:resid_nut |
0.6314493 |
1 |
0.427 |
Asynchrony
Response diversity (one of the stabilisng effects captured by imbalance) has been suggested as a mechanism that promotes temporal stability of community biomass by promoting species asynchrony.
We thus calculated the asynchrony index suggested by Gross et al. 2014 to calculate the effect of asynchrony on temporal stability and to see how response diversity relate to asynchrony.
The index ranges between -1 and 1, with -1 indicating perfect asynchrony and 1 being perfectly synchronous, and 0 indicating random variation.
Plot stability vs. Asynchrony Gross

Figure 11: Relationship between temporal stability and asynchrony (Gross) divided by nutrient level.
Plot Asynchrony Gross vs fundamental imbalance

Eveness
Evenness in species biomass has been identified as an important factor potentially influencing ecosystem stability Thibaut & Connolly 2013. In the context of our experiment, evenness in species biomass could help explaining why there is little difference between fundamental and realized imbalance. If evenness is high, then all species contribute similarly to total biomass. In this case, weighting for species-biomass contribution to total biomass (realized), should not fundamentally change the result, compared to an un-weighted (fundamental) measurement.

Figure 12: Distribution of species evenness across experimental communities. The histogram represents the frequency of observed evenness values, while the red dashed line indicates the mean evenness (0.4). This highlights the central tendency of evenness across the dataset and its variation among communities.
Evenness is lower when using the reduced time series, indicating possible larger role of dominance and population stability in the second part of the experiment.
Population stability
The relationship between community stability and the stability of the individual populations that make up the community is a key question in ecology. Importantly, ecosystem stability can result from low population stability, if populations fluctuate asynchronously, or from high population stability, if populations do not fluctuate much.
Synthesis of the literature suggests diversity can have a positive or negantive effect on population stability Campbell et al 2010 and (Xu et al 2021)[https://onlinelibrary.wiley.com/doi/full/10.1111/ele.13777].
Theoretical work has suggested that community stability is a product of two quantities: the (a) synchrony of population fluctuations, and an average species-level population stability that is weighted by relative abundance Thibaut & Connolly 2013.
Critically, a imbalance value close to zero can result from high response diversity, but also from high population stability (population biomass does not change largely over time).
We want to look now at whether our new metric of imbalance can capture these two stabilising mechanisms.
Thus, we calculate species-level population stability weighted by relative abundance and look at how it relates to ecosystem stability.
Figure 14: Relationship between log10 of population stability and log 10 of ecosystem stability.

Figure 15: Relationship between fundamental imbalance and population stability divided by nutrient level.
SEM
Finally, we use a structural equation model (SEM) to explore how stability is influenced by asynchrony, population stability, imbalance and, nutrient levels.
In order to develop a hypothesis regarding the influence of stability, we have drawn on existing literature. This has enabled us to posit that stability is influenced by two key factors: asynchrony and population stability. In turn, these are influenced by balance and, in our particular case, by nutrient levels.
The model presented in the main text did not fit this portion of data well, we thus switched to a piecewise SEM approach, which allows us to fit a series of linear models and then combine them into a single SEM model. This approach is more flexible and can be more robust to violations of the assumptions of SEM.
Table 15: Results of the piecewise SEM.
## | | | 0% | |=================================== | 50% | |======================================================================| 100%
| Path Coefficients (Piecewise SEM) |
| Response |
Predictor |
Estimate |
SE |
DF |
t-value |
p-value |
Standardized Estimate |
X |
| stability |
Population Stability |
0.824 |
0.024 |
232.624 |
34.452 |
0.000 |
0.918 |
*** |
| stability |
asynchrony_Gross |
0.067 |
0.023 |
236.759 |
2.946 |
0.004 |
0.075 |
** |
| asynchrony_Gross |
log10(imbalance) |
0.016 |
0.018 |
241.000 |
0.903 |
0.368 |
0.058 |
|
| Population Stability |
log10(imbalance) |
−0.048 |
0.018 |
241.000 |
−2.745 |
0.006 |
−0.174 |
** |
In the last 20 days of the experiment, population stability dominates the effect on stability.